#!/bin/sh

bd=/home/scd/shicd/atv
wd=$bd/example
sd=$bd/scripts

cd $wd

# 1
# sgml -> tree/sentence
$sd/extract_sgml.py < example.sent.chi.sgml > example.sent.chi.0
$sd/extract_sgml.py < example.sent.eng.sgml > example.sent.eng.0
$sd/extract_sgml.py < example.tree.chi.sgml > example.tree.chi.0

# 2
# split_trees
cp example.tree.eng example.tree.eng.0
$sd/split_trees.py < example.tree.chi.0 > example.tree2.chi.0
$sd/split_trees.py < example.tree.eng.0 > example.tree2.eng.0

# 3
# convert multi-line-tree to single-line-tree
$sd/tree2line.py < example.tree2.chi.0 > example.tree3.chi.0
$sd/tree2line.py < example.tree2.eng.0 > example.tree3.eng.0

# 4
# clean up
cp example.tree3.chi.0 example.tree3.chi
cp example.tree3.eng.0 example.tree3.eng
rm *.0
